package com.bw.gmall.mapper;

import com.bw.gmall.domain.Pro;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

// 一个只能对应数据库的一张表
public interface ProductMapper {
    @Select("select sum(original_amount) from dws_trade_sku_order_window where cur_date=#{date}")
    BigDecimal queryGmv(Integer date);

    @Select("select province_name name,sum(order_amount) value from dws_trade_province_order_window where cur_date = #{date} group by province_name")
    List<Pro> queryGmvByProvice(Integer date);
}
